package org.qiyu.live.user.provider.utils;

/**
 * @ClassName: TagInfoUtils
 * @Description: TODO
 * @Author zhangguangyan
 * @Date 2023/08/06/ 22:07:49
 * @Version 1.0
 */
public class TagInfoUtils {
    /**
     * 判断是否存在某个标签
     * @param tagInfo 用户当前标签
     * @param matchTag 被查询用户是否存在的标签
     * @return
     */
    public static  boolean isContain(Long tagInfo,Long matchTag){
        return tagInfo !=null && matchTag != null &&matchTag>0&& (tagInfo & matchTag) == matchTag;
    }

    public static void main(String[] args) {
        System.out.println(isContain(3L,2L));
    }
}
